<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<!DOCTYPE html>
<html>
<head>
    <title>用户修改</title>
    <script src="${pageContext.request.contextPath}/js/jquery-3.4.1.min.js"></script>
    <script src="${pageContext.request.contextPath}/js/bootstrap.js"></script>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/bootstrap.css">
</head>
<body>
<h2 style="color: red">${requestScope.error}</h2>
<form action="${pageContext.request.contextPath}/update" method="post">
    <input type="hidden" name="id" value="${requestScope.user.id}">
    <label for="name">名字:</label>
    <input id="name" type="text" name="name" value="${requestScope.user.name}"><br/>

    性别:
    <input type="radio" name="sex" value="男" <c:if test="${requestScope.user.sex eq'男'}">checked</c:if> > 男
    <input type="radio" name="sex" value="女" <c:if test="${requestScope.user.sex eq'女'}">checked</c:if> > 女 <br/>

    <label for="code">出生日期:</label>
    <input id="code" type="date" name="birthday" value="<fmt:formatDate pattern='yyyy-MM-dd' value='${requestScope.user.birthday}'/>"><br/>

    <input type="submit" value="提交">
</form>

</script>
</body>
</html>